package com.markerhub.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author by MaXiaofeng
 * @Description 后台管理员数据库接口
 * @Date 2022/2/22 19:38
 * @Version 1.0.0
 */
@Mapper
@Repository
public interface Tb_UserMapper {
    /**
     * 根据用户名查询密码
     *
     * @param username
     * @return
     */
    String selectPasswordByUsername(@Param("username") String username);

    /**
     * 根据用户名查询用户id
     *
     * @param username
     * @return
     */
    int findUserIdByUsername(@Param("username") String username);

    /**
     * 更改用户密码
     *
     * @param userId
     * @param username
     * @param password
     * @return
     */
    int updatePasswordByUserId(@Param("userId") int userId, @Param("username") String username, @Param("password") String password);
}
